package com.nuoniu.sibanyun.mapper.erp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.erp.ErpDespatchType;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 发运方式 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2020-12-08
 */
public interface ErpDespatchTypeMapper extends BaseMapper<ErpDespatchType> {

    /**
     * 根据名称获取
     * @author 小啊刚
     * @date 2021-05-22
     */
    @Select("select * from scb_trans_mode where name=#{name} and company_id=#{companyId} limit 1")
    ErpDespatchType getByName(String name, Integer companyId);

    /**
     * 根据编码获取
     * @author 小啊刚
     * @date 2021-05-22
     */
    @Select("select * from scb_trans_mode where code=#{code} and company_id=#{companyId} limit 1")
    ErpDespatchType getByCode(String code, Integer companyId);
}
